import axios from 'axios'
axios.get('/house').then((res) => {
    renderHouse(res.data)
})

function renderHouse(data) {
    const house = document.querySelector('.house')
    house.innerHTML = data.map((v) => {
        return `<li>
        <img src='${v.img}' />
        <h2>${v.text}</h2>
        <h2>${v.price}</h2>
        <h2>${v.title}</h2>
        </li>`
    }).join('')
}